namespace Sagile.Nepma.Test
{
    using System;
    using System.Reflection;
    using System.Windows.Forms;
    using Forms;

    /// <summary>
    /// Test form
    /// </summary>
    public partial class TestForm : Form
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="TestForm"/> class.
        /// </summary>
        public TestForm()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            TaskManager myManager = new TaskManager();
            TaskBase[] myTasks = TaskLoader.GetTasksFromAssembly(Assembly.GetExecutingAssembly());

            MonitoringForm monitor = new MonitoringForm();
            monitor.HighlightParallelTasks = true;
            monitor.Manager = myManager;
            monitor.Tasks = myTasks;

            monitor.Show();
        }
    }
}